<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>排课管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link href="__PUBLIC__/css/layui.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/admin.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/public.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="__PUBLIC__/css/looklayer.css"  media="all">
    <style>
        .layui-layer-setwin .layui-layer-close2  {
            position: relative !important;
            right: 0!important;
            top:0 !important;
        }
        .name-list{
            border:1px solid #ccc;
            height: 100%;
            overflow:scroll;
            margin-bottom: 30px;
        }

    </style>
</head>
<body>
<div class="layui-conter">
    <div class="layui-col-md12">
        <div class="navigation">
            <span>教务></span><span>排课管理</span>
        </div>

        <div class="white-conter" style="height:800px;">
            <div class="layui-col-md12" style="height:100%;">
                <div class="layui-card">
                    <div class="title-blue">排课管理</div>
                    <div class="layui-card-body addPadding">
                    </div>
                </div>
                <div class="layui-col-md12"  style="height:100%;">
                    <div class="layui-card" style="height:100%;">
											<form action="{:U('Classsetting/schedule_show')}" method="post">
												<input name="class_id" value="{$data.class_id}" type="hidden">
												<input name="date_id" value="{$data.id}" type="hidden">
												<input name="time" value="{$data.time}" type="hidden">
                        <div class="layui-card-body">
                            <div class="layui-btn-group">
                                <table  class="layui-hide" id="test-table-operate" lay-filter="test-table-operate"></table>
                                    <div class="layui-form layui-border-box layui-table-view" lay-filter="LAY-table-1">
                                        <div class="layui-table-box" style="margin-bottom: 20px">
                                            <div class="layui-table-body layui-table-main">
                                                <table cellspacing="0" cellpadding="0" border="0" class="layui-table">
                                                    <tbody>
                                                        <tr>
                                                            <th>
                                                                考勤类型：
                                                            </th>
                                                            <th>
                                                                <div class="" id="" style="width: 400px;float: left;">
																																	<foreach name="state" item="s">
																																		<input <if condition="$s['id'] eq 29"> checked </if> type="radio" lay-filter="select" name="state_id" value="{$s.id}" title="{$s.name}">
																																	</foreach>
                                                                </div>
                                                            </th>
                                                            <th>
                                                                备注：
                                                            </th>
                                                            <th style="padding-right:10px;">
                                                                <input type="text" name="content" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">  
                                                            </th>
                                                            <th style="padding-right:10px;">
                                                                <button class="layui-btn layui-btn-primary layui-btn-sm" style="background-color:#0090ff;border:none;color:#fff;">执行考勤</button>
                                                            </th>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </table>
                            </div>
                            <table  class="layui-hide" id="test-table-operate" lay-filter="test-table-operate"></table>
                            <div class="layui-form layui-border-box layui-table-view" lay-filter="LAY-table-1">
                                <div class="layui-table-box" style="margin-bottom: 20px">
                                    <div class="layui-table-body layui-table-main layui-col-md10">
                                        <table cellspacing="0" cellpadding="0" border="0" class="layui-table">
                                            <thead>
                                            <tr>
                                                <th data-field="0" data-unresize="true">
                                                    <div class="layui-table-cell laytable-cell-1-0 laytable-cell-checkbox">
                                                        <input type="checkbox" name="0" lay-skin="primary" lay-filter="allChoose">
                                                    </div>
                                                </th>
                                                <th data-field="id">
                                                    <div class="layui-table-cell">
                                                        <span>学号</span>
                                                    </div>
                                                </th>
                                                <th data-field="username">
                                                    <div class="layui-table-cell " align="center">
                                                        <span>姓名</span>
                                                    </div>
                                                </th>
                                                <th data-field="course">
                                                    <div class="layui-table-cell" align="center">
                                                        <span>出勤状态</span>
                                                    </div>
                                                </th>
                                                <th data-field="time">
                                                    <div class="layui-table-cell" align="center">
                                                        <span>备注/课堂表现</span>
                                                    </div>
                                                </th>
                                                <th data-field="operation">
                                                    <div class="layui-table-cell" align="center">
                                                        <span>操作</span>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody>
																						<foreach name="data['student']" item="d">
                                            <tr data-index="0" class="">
                                                <td data-field="0">
                                                    <div class="layui-table-cell laytable-cell-1-0 laytable-cell-checkbox">
                                                        <input type="checkbox" name="all[]" value="{$d.id}" lay-skin="primary">
                                                    </div>
                                                </td>
                                                <td data-field="id" align="center">
                                                    <div class="layui-table-cell">{$d.student_id}</div>
                                                </td>
                                                <td data-field="username" align="center">
                                                    <div class="layui-table-cell">{$d.name} </div>
                                                </td>
                                                <td data-field="time" align="center">
                                                    <div class="layui-table-cell ">{$d.state_name}</div>
                                                </td>
                                                <td data-field="consultant" align="center">
                                                    <div class="layui-table-cell">{$d.content}</div>
                                                </td>
                                                <td data-field="operation" align="center">
                                                    <div class="layui-table-cell ">
                                                        <button data-method="offset" data-type="auto"  class="img-but edit-img"></button>
                                                    </div>
                                                </td>
                                            </tr>
																						</foreach>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div>
                                    <button class="layui-btn layui-btn-primary layui-btn-sm" onClick="javascript :history.back(-1);" style="background-color:#0090ff;border:none;color:#fff;">排课列表</button>
                                </div>
                            </div>
                        </div>
												</form>
                    </div>
                </div>
            </div>
        </div>


    </div>
</div>
</body>
<script src="__PUBLIC__/js/layui.all.js"></script>
<script>
    layui.use( ['form','layer','laydate','element'], function(){
        var  form = layui.form
            , $ = layui.jquery
            ,layer = layui.layer
            ,element = layui.element
            , laydate = layui.laydate;
						//全选
					form.on('checkbox(allChoose)', function(data){
									var child = $(data.elem).parents(".layui-col-md10").find('input[type="checkbox"]');
							child.each(function(index, item){
								item.checked = data.elem.checked;
							});
							form.render('checkbox');
					});
        element.render();
        //触发事件
        var active = {
            offset: function(othis){
                var type = othis.data('type')
                    ,text = othis.text();
                layer.open({
                    type: 1,
                    title: false,
                    area: ['1000px', '572px'],
                    shadeClose: true,
                    skin: 'layer-look',
                    content:'<form class="layui-form layer_notice"  action="" lay-filter="test1" >' +
                    '</form>'
                });

            }
        };
        $('.edit-img').on('click', function(){
            var othis = $(this), method = othis.data('method');
            active[method] ? active[method].call(this, othis) : '';
            var html= '<div class="look-conter">' +
                '    <div class="look-title">客户详细信息</div>' +
                '</div>' +
                '<div class="layui-col-md12 msgCont">' +
                '<div class="layui-col-md6">' +
                '<div class="listTop"><div class="layui-col-md5">客户姓名</div><div class="layui-col-md6">  <input type="text" placeholder="张宇航" class="layui-input" ></div></div>' +
                '<div class="listTop"><div class="layui-col-md5">性别</div><div class="layui-col-md7">男</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">称呼</div><div class="layui-col-md7">父亲</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">空闲时间</div><div class="layui-col-md7">2018-01-01</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">出生年月</div><div class="layui-col-md7">2018-01-01</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">咨询校区</div>' +
                '<div class="layui-col-md7">' +
                '<select name="quiz1" style="display: block"> ' +
                '<option value="" selected="">请选择</option>' +
                '<option value="1" >1</option>' +
                ' <option value="2">2</option>' +
                ' <option value="3">3</option>' +
                '</select>' +
                '</div>' +
                '</div>' +
                '<div class="listTop"><div class="layui-col-md5">邻近校区</div><div class="layui-col-md7">长宁北新泾校区</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">上次咨询时间</div><div class="layui-col-md7">2018-05-30</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">下次回访时间</div><div class="layui-col-md7">2018-05-30</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">获取广告方式</div><div class="layui-col-md7">宣传单</div></div>' +
                '</div>' +
                '<div class="layui-col-md6">' +
                '<div class="listTop"><div class="layui-col-md5">咨询课程</div><div class="layui-col-md7">百元体验英语课</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">常用座机</div><div class="layui-col-md7">021-88888888</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">手机</div><div class="layui-col-md7">13046658607</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">其他电话</div><div class="layui-col-md7">13046658607</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">QQ</div><div class="layui-col-md7">13046658607</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">电子邮箱</div><div class="layui-col-md7">1234567891@163.com</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">地址</div><div class="layui-col-md7">上海市普陀区</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">状态</div><div class="layui-col-md7">潜在</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">咨询顾问</div><div class="layui-col-md7">张三</div></div>' +
                '<div class="listTop"><div class="layui-col-md5">数据采集人</div><div class="layui-col-md7">张三</div></div>' +
                '</div>  <div class="layui-col-md12">\n' +
                '                            <div class="button-block">\n' +
                '                                <button class="layui-btn layui-btn-xs layui-btn-normal" lay-submit="" >保存</button>\n' +
                '                                <button  class="layui-btn layui-btn-xs btn-grey">下一步</button>\n' +
                '                            </div>\n' +
                '                        </div>' +
                '</div>'
            $('.layer_notice').append(html);

        });
        var shows=false;
        $('.more').on('click',function(){
            if(shows == false){
                $('.more_show').show()
                $(this).find('.layui-icon').removeClass('layui-icon-up')
                $(this).find('.layui-icon').addClass('layui-icon-down')
                shows=true;
                console.log()
            }else if(shows == true){
                $('.more_show').hide()
                $(this).find('.layui-icon').removeClass('layui-icon-down')
                $(this).find('.layui-icon').addClass('layui-icon-up')
                shows=false
                console.log(12)
            }

        })
        //执行一个laydate实例
        laydate.render({
            elem: '#signTime' //指定元素
        });
        laydate.render({
            elem: '#data' //指定元素
        });
    });
</script>
</html>